package de.koller.gravity.scene.planet;

import de.koller.aframe.plain.Sprite;
import de.koller.gravity.scene.Scene;
import de.koller.oceanFramework.gl.util.ImagePreview;
import java.awt.image.BufferedImage;
import java.util.Random;

public class PlanetScene extends Scene {
	public Random rnd = new Random();
	public int width = 1280;
	public int height = 720;
	
	public static void main( String[] args ) {
		PlanetScene f = new PlanetScene();
		ImagePreview.showImage( f.renderScene(), f.width, f.height );
	}
	
	@Override
	public BufferedImage renderScene() {
		return renderScene( 0 );
	}
	
	public BufferedImage renderScene( int frame ) {
		Sprite screen = new Sprite( width, height );
		screen.raster.clear( 0xff_000000 );
		
		Planet planet = new Planet();
		planet.position.set( width / 2, height / 2 );
		planet.radius = 300;
		planet.render( screen.graphics );
		
		return screen.image;
	}

}
